use 5.008008;
use ExtUtils::MakeMaker;

$CC = 'g++';

# Succinct pre-requisites at present!
my $build_requires = { 'Bio::Phylo'  => 0.17, };

# See lib/ExtUtils/MakeMaker.pm for details of how to influence
# the contents of the Makefile that is written.
WriteMakefile(
    NAME              => 'Bio::Phylo::BioPrio',
    AUTHOR            => 'Klaas Hartmann <k.hartmann@math.canterbury.ac.nz>',
    ABSTRACT_FROM     => 'lib/Bio/Phylo/BioPrio.pm',
    VERSION_FROM      => 'lib/Bio/Phylo/BioPrio.pm',
    PREREQ_PM         => $build_requires,
    'CC'              => $CC,
    'LD'              => '$(CC)',
    MYEXTLIB          => 'ext/ratslib$(LIB_EXT)',
    # OBJECT            => '$(O_FILES)', # link all the C files too
    XSOPT             => '-C++',
    TYPEMAPS          => ['perlobject.map' ],
);

sub MY::postamble {
'
$(MYEXTLIB): ext/Makefile
		cd ext && $(MAKE) $(PASSTHRU)
';
}